package com.example.demo.service;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit.jupiter.SpringExtension;

import static org.mockito.Mockito.when;


/**
 * 集成测试
 */
@ExtendWith({SpringExtension.class})
@Import({BAService.class,AService.class})
class BAServiceIntegrationTest2 {
    @Autowired
    BAService baservice;

    @Autowired
    AService aService;

    @Test
    void doHandle() {
        String doHandle = baservice.doHandle();
        Assertions.assertEquals("BAService doHandle AService2 doHandle",doHandle);
    }

}